GitLab Test Management and Testing Automation integration

Launching high-quality software products powered with valuable features and enhanced with security updates creates a win-win scenario for any company. But isn’t rushing new code into production a recipe for mistakes? That’s where test management system integration with GitLab is a game-changer in building and deploying error-free code. If properly incorporated, it helps development and testing teams develop, deploy and release features as fast as possible. What’s more, this eliminates communication bottlenecks, provides visibility across the teams, streamlines development efforts and reduces test failures. Keep on reading our article to learn more details!

For many companies, creating new software products is more crucial than ever before to succeed. Unfortunately, thousands of new software products are never launched and introduced to the market. According to research, there are over 30,000 new products launched every year, and about 95% fail. Having that in mind, delivering high-quality products is the goal of every company that wants to win the race and drive revenue.

With CI\CD practices in place, companies can automate and streamline the development process and make it as seamless as possible. That’s where GitLab tool comes into play. It not only ensures faster build, delivery, and deployment cycles but helps automate tasks and launch fully-fledged products quickly.

Read our article to learn more details about GitLab tool, its benefits and test automation capabilities as well as find step-by-step instructions on GitLab integration with test case management system.

What’s GitLab?

Initially designed to manage code repositories, Gitlab is used as an open-source cloud-based CI\CD tool that allows development and testing teams to collaborate and work on the projects. It is built in Ruby, but the tech stack includes Ruby on Rails, Go and Vue.js technologies. One of the key applications of GitLab in modern development practices is GitLab CI testing, which enables seamless integration and automation of testing processes in the CI/CD pipeline.
GitLab works on a freemium basis and offers both free and paid plans. They are the following:

  • Free-based: it is a perfect solution for users working individually.
  • Premium: it is helpful for small teams aiming to boost their productivity.
  • Ultimate: it provides security, compliance, and planning functionality for big companies in addition to many other features.

When applied during the development process, it allows teams to perform the next tasks:

  • Organizing project planning
  • Managing code repository
  • Hosting and monitoring their code changes
  • Monitoring progress, etc.

Additionally, it provides great integration possibilities for the teams to produce better software products and reduce product lifecycle.

What are key features of GitLab?

When using GitLab, you should have an in-depth understanding of the core features it provides:

  • User Role Management: this feature enables permissions based on the users’ role in a project, provides user statistics and helps make the development process more streamlined and secure.
  • CI\CD pipeline: with this feature set, teams can overview test cases version history as well as keep under control all changes made in the codebase with ease.
  • Merge Management: with this feature, teams can manage a merge request workflow and bring changes due to implemented code merge request.
  • Issues Tracking: this feature helps teams in following the progress of every issue through task lists, thread discussions, milestones, labels, due dates, assignees until it is successfully resolved.
  • Security options: thanks to this feature, teams are equipped with automated security scans for vulnerabilities and compliance violations with each commit.

What are the benefits of GitLab?

Here we are going to highlight the benefits you can derive from using GitLab tool:

  • It provides Docker integration.
  • It allows teams to create new jobs and handle conflicts with ease.
  • It offers parallel job execution.
  • It includes easy-to-scale runners.
  • It allows teams to create new jobs and handle conflicts with ease.
  • It delivers sophisticated security options.
  • It helps teams create testing scenarios.

Why development teams choose GitLab

Ultimately, your CI\CD tool should meet your wants and needs. Let’s discover why software engineers and QA team select GitLab:

  • Teams prefer GitLab tool in terms of its easy configuration and installation – in the cloud, on premises or on a container.
  • Eliminating manual setup of CI\CD pipeline, implementation and testing teams take advantage of the Auto DevOps feature that offers test automation.
  • With the help of Gitlab integration tool, development and testing teams keep control under Git repositories, better manage and minimize threats in their codebase.
  • Development and QA teams significantly increase project efficiency by tracking the GitLab issues and performing code reviews.
  • In terms of a cloud-based environment, GitLab provides great analytics options. This helps development and QA teams to be in the know about what is going on at any stage of the software development process.

How GitLab CI\CD works

You can use CI\CD pipelines in any software development process. Before diving into how it works, let’s discuss its basis:
Commit: a change made in the code.

  • Job: means instruction that should be executed by a runner.
  • Pipeline: a set of jobs broken into different stages.
  • Runner: an agent or server that executes each job individually.
  • Stages: a keyword that defines certain stages of a job, such as test, build, image and deploy.

Once you have discussed code changes, you can push your commits to a feature branch in a remote repository. This repository is hosted in GitLab. When a push to the branch occurs, the CI\CD pipeline is triggered.

How GitLab CI\CD works
Source

Then, GitLab CI\CD executes automated scripts (one by one or in parallel). This helps in:

  • Building and testing your software product
  • Previewing the changes locally

When a process succeeds, you merge the feature branch into the default one, once your code is reviewed and approved. It is also important to note that CI\CD deploys your changes automatically to a production environment. However, you can roll back your changes, if something goes wrong.

How To Integrate GitLab CI With Test Management

Our test management system tool allows software developers to work on projects and perform their daily tasks on external CI systems, including GitLab CI testing system, thanks to RestFul API. If the testing process finishes, the team gets a report in testomat.io test management system sent out through the reporter option.

This helps establish transparency to the QA team and make improvements. When integrating GitLab, teams avoid using external test planning tools. Instead, they can better manage all the test cases, track GitLab issues and better plan testing scenarios across the development workflow. Let’s discover how to integrate GitLab project with mentioned test tool in detail.

#1: Start A Project And Create Test Cases

The first step is to create a project. It should be done before connecting the CI server to the test management system.

Start A Project And Create Test Cases
Then, you need to find automated tests in a repository and import them into the project.

testomatio import sourse code ids

Unique test IDs are important when exporting or importing test cases. Testomat.io eliminates time-consuming and error-prone manual creation of unique test case IDs. All is done automatically. However, when syncing IDs for imported tests, it’s critical to check frameworks have are used. Take into account the different commands applied when updating your source code:

  • check-tests command for importing tests with --update-ids for JS-based frameworks.
  • check-cucumber command with --update-ids the command for Cucumber framework.

It’s important to note that you must check if IDs are written correctly before pushing a commit to the repository.

#3: Configure Continuous Integration Settings

In order to connect the test project to your CI\CD pipeline, you should find the Continuous Integration tab (CI tab) on the Project Dashboard. Just select Gitlab tool from the list, modify appropriate settings and save them.

Configure Continuous Integration Settings

Take into account that all the checkboxes should be selected:

  • Send Run ID as ‘run’ input (required for scheduled jobs)
  • Send Testomatio API key as ‘testomatio’ input
  • Send Testomatio Server URL as ‘testomatio_url’ input

Configure Continuous Integration Settings 2

If there are no errors, you will see a success message once the test connection button has been clicked.

#4: Create A New Job In CI To Build And Test

GitLab uses .gitlab-ci.yml file to define configuration in the workflow. It’s important to mention that you need to create a workflow used in testomat.io only. Your code should have the following parameters:

    - export TESTOMATIO="${testomatio}"
    - export TESTOMATIO_URL="${testomatio_url}"
    - export TESTOMATIO_RUN="${run}"

Additionally, for the testomat.io environment variables to be passed in, the test runner should be executed with –grep option.

 - npx codeceptjs run-workers 2 --grep "${grep}"

#5: Execute Tests And View Results

You can start executing your automated tests in one click – Open a test, select Run in CI and click the Launch button once GitLab CI tool has been set up successfully.

Execute Tests And View Results

Furthermore, you can track, view, and share test results displayed in the test management tool. All kinds of test cases, including slow, failing, or flaky test cases will be defined and presented in numbers.

Execute Tests And View Results 2

This helps all parties involved – QAs, BAs, PMs look into the facts and figures and plan the testing activities to make the test automation process more efficient.

Bottom Line:

Let testomat.io help you start your CI\CD journey with GitLab integration

Launching innovative software products can be challenging for many companies. Now it’s clear that setting up a CI\CD pipeline is a way out for them to accelerate software delivery and improve quality.

With GitLab integration into the test case management system, you can better track issues, catch and fix the bugs promptly, accelerate release cycles, get detailed test case reports and have one-click deployments.

With testomat.io & GitLab, you don’t need to worry about this. Drop us a line if you need a consultation about GitLab integration. Our specialists will give you a hand and answer all the questions about GitLab test case management and test automation integration.